The invention relates generally to the field of rendering scenes and objects with polygons, and more particularly to rendering geometric edge features of the scenes and objects with polygons.
Scenes and graphics models are frequently rendered as images using polygon meshes. Polygon meshes often include geometric edge features such as silhouettes, ridges, valleys, and intersections A silhouette edge of a polygon connects a back-facing polygon to a front-facing polygon. A ridge edge connects two adjacent polygons disposed at angle that is less than a ridge threshold angle. For a valley edge, the angle of the two adjacent polygons is greater than a valley threshold angle. An intersection edge is common to an interior portion of two intersecting polygons.
When these particular edges are accentuated in the images, they can convey a great deal of information to the viewer. In static images, such as, technical illustrations, engineering CAD diagrams, and non-photo-realistic renderings, accentuated features enhance the appearance of the underlying graphics models.
A number of rendering methods that consider these special geometric features are know in the prior art. Techniques for rendering features of polygonal scenes are described by Gooch et al., xe2x80x9cInteractive Technical Illustration,xe2x80x9d Symp. on Interactive 3D Graphics, 1999, and Markosian et al. xe2x80x9cReal-Time Non-photo realistic Rendering,xe2x80x9d Computer Graphics, Proceedings of SIGGRAPH ""97, August, 1997.
Raskar, xe2x80x9cImage Precision Silhouette Edges,xe2x80x9d Interactive 3D Graphics Symposium, 1999, and Rossignac et al. xe2x80x9cHidden Contours on a Framebuffer,xe2x80x9d Proceedings of the 7th Workshop on Computer Graphics Hardware, Eurographics, 1992, described techniques for rendering silhouettes that required two rendering passes. Furthermore, their edge enhancement was based on non-realistic, substantially orthographic projection, and not exact and correct perspective projection. Moreover, Rossignac et al., required multiple depth and frame buffers during scan conversion, and a mix of line and polygon renderings techniques.
When adjacency information for the polygons is available, identifying sharp edges is relatively simple for static models. In one traditional approach, a scene graph or list is traversed for each polygon edge to determine the relationship between adjacent polygons and identify the special features. Then, the features can be rendered using a visibility process.
When adjacency information is not available, identifying special features requires random traversals of the scene graph or list to locate adjacent polygons. Generating and maintaining an adjacency matrix, and traversing it increases processing time and memory requirements. Hence, such operations are usually performed by software. This task becomes even more difficult for dynamic scenes. This is the primary reason why geometric feature enhancement is not used during most dynamic visualizations.
Even if adjacency information is available, most commonly used hardware and software rendering engines cannot use the information. Rendering hardware preferably operates, in parallel, on relatively small sets of triangles, one set at the time, and all the information necessary for rendering must be contained in the individual triangles of the sets. Ideally, a rendering pipeline processes each polygon without having to use information about other polygons.
A secondary problem with explicit edge rendering as lines is that typical polygon raster scan conversion pipelines are less efficient when 2D or 3D lines are displayed. This is because the raster lines are filled to a uniform width in a screen coordinate system that is different that the coordinate system used for the polygons.
Also, silhouette edges are view-dependent and must be determined for each frame. In contrast, ridges and valleys are view independent, and hence, fixed under rigid transformations. For example, whether a polygon is front-facing or back-facing, with respect to a point or directional light source, is view-independent during lighting calculations. However, for most hardware pipelined rendering operations, it is just simpler to compute and render the edges in frame, without using coherence information from previous frames. And, for software rendering engines, it is usually easier to generalize, and just compute a corresponding dot product for each frame.
Therefore, there is a need for a method that can directly identify special features in a frame buffer. Then, the special features can still be displayed while rendering the polygons one at the time with traditional rendering engines that would otherwise need connectivity information. Furthermore, the method should perform feature identification operations without the use of other rendering operations such as lighting. Furthermore, the method should operate correctly with realistic perspective rendering techniques.
The present invention enables the rendering of special features of a scene or graphics model, such as silhouettes, ridges, valleys, and intersections by rendering engines that process one individual polygon at the time. The invention determines the special features using only local calculations, and does not depend on a polygon mesh being closed or open, concave or convex, or having cusps.
More specifically, the invention provides a method for rendering a mesh constructed of polygons, the mesh representing a graphics model. The polygons are processed one at the time to accentuate geometric features of the mesh. At least one additional polygon is generated at each edge of each polygon of the mesh. Each additional polygon has a predetermined orientation, size, and color. The predetermined orientation of the generated polygons is 180xc2x0 with respect to the polygon if the polygon is a back-facing polygon to accentuate silhouettes. The predetermined orientation of the generated polygon is a first threshold angle with respect to the polygon if the polygon is a front-facing polygon to accentuate ridges, and the predetermined orientation of the generated polygon is a second threshold angle with respect to the polygon if the polygon is a front-facing polygon to accentuate valleys.